﻿<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="home/commons/include :: common_header('房间详情')" />
    <link rel="stylesheet" th:href="@{/index/layui/css/layui.css}" />
    <script type="javascript" th:src="@{/index/layui/layui.all.js}"></script>
</head>
<style>


    @media (max-width: 1024px) {
        .banner-n { margin-top: 60px; }
    }

    ._slick1 .slick-prev { margin-left: -80px; }
    ._slick1 .slick-next { margin-right: -80px; }
    .room_js .one { display: none; }
    .room_js .two { }

    @media (max-width: 1024px) {
        .room_js .one { display: block; }
        .room_js .two { display: none; }
    }
</style>


<body>
    <th:block th:include="home/commons/include :: index-header(-1)"/>

    <div class="banner-n clearfix">
        <div class="frame" style="background: url(/index/images/timg1.jpg) no-repeat center center;
        background-size:cover; width:100%;"></div>
    </div>

    <div class="wy_dw">
        <div class="dw g_cw">
            <p>
                <img class="" th:src="@{/index/images/dw_nei.png}">
                <a th:href="@{/home/index/index}">网站首页</a><span> &nbsp >> &nbsp
                </span><a th:href="@{/home/index/room}">酒店房间</a>
            </p>
        </div>
    </div>

    <div class="room_xq">
        <div class="g_cw g_mt">
            <div class="g_title">
                <h5>[[${room.roomType.type}]]</h5>
            </div>
        </div>


        <div class="room_js">
            <div class=" g_cw">
                <div class="two">
                    <div class="center _slick1" style=" width:800px; margin:0 auto;">
                        <img class="ct_a" th:src="${room.headpic} ?: '/img/fangjian.jpg'" />
                    </div>
                </div>


                <div class="wb_js g_mt">
                    <div class="bt">
                        <a th:switch="${room.isTimeLimit == 1}">
                            <a th:case="false" class="layui-btn" th:href="@{/home/index/room_reserve_timelimit(id=${room.id})}">立即预定</a>
                            <a th:case="true" class="layui-btn" th:href="@{/home/index/room_reserve(id=${room.id})}">立即预定</a>
                        </a>
                    </div>
                    <div class="js">
                        <div class="layui-form-item">
                            <label class="layui-form-label">评分:</label>
                            <div id="rate">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <pre style="background-color: #FFF;" class="l1" th:text="${room.content}"></pre>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <th:block th:include="home/commons/include :: index-foot" />
    <script th:src="@{/index/layui/layui.all.js}"></script>
    <script th:src="@{/index/layui/layui.js}"></script>
<script>
    layui.use(['form', 'element', 'upload','rate'], function () {
        var rate = layui.rate;
        rate.render({
            elem: '#rate'
            ,value: [[${value}]]
            ,half: true
            ,text: true
            ,readonly:true
            ,setText: function(value){
                var arrs = {
                    '1': '极差'
                    ,'2': '差'
                    ,'3': '中等'
                    ,'4': '好'
                    ,'5': '极好'
                };
                this.span.text(arrs[value] || ( value + "星"));
            }
        });
    });
</script>
</body>
</html>

